<template>
  <div class="recommend">
    <div
      class="recommend_item"
      v-for="(item, index) in recommends"
      :key="index"
    >
      <a :href="item.link">
        <img :src="item.image" alt="" />
        <div class="recommend_item_title">{{ item.title }}</div>
      </a>
    </div>
  </div>
</template>

<script>
export default {
  name: "RecommendView",
  props: {
    recommends: {
      type: Array,
      default() {
        return [];
      },
    },
  },
};
</script>

<style scoped>
.recommend {
  display: flex;
  padding: 10px 0 15px;
  border-top: 10px solid #eee;
  border-bottom: 10px solid #eee;
}

.recommend_item {
  flex: 1;
  text-align: center;
}
.recommend_item a img {
  width: 90%;
}
.recommend_item_title {
  margin-top: 10px;
  font-size: 18px;
  color: var(--color-high-text);
}
</style>